import java.util.ArrayList;
import java.util.Arrays;

public class java6 {
    public static void main(String[] args) {
        int[] arr={1,2,3};
        int[] arr1={3,4,5,2};
        ArrayList<Integer> arr2=new ArrayList<>();
        for (int i = 0; i <arr.length ; i++) {
            arr2.add(arr[i]);
        }
        for (int i = 0; i <arr1.length ; i++) {
            arr2.add(arr1[i]);
        }

        ArrayList<Integer> arr3=new ArrayList<>();
        for (int i = 0; i <arr2.size() ; i++) {
            int n=0;
            for (int j = 0; j <arr2.size() ; j++) {
                if(arr2.get(i)==arr2.get(j)){
                    n++;
                }
            }
            if (n<2){
                arr3.add(arr2.get(i));
            }
        }
        System.out.println(arr3);
    }
}
